package com.blb.day20231107login.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.blb.day20231107login.entity.Permission;
import com.blb.day20231107login.entity.ResponseResult;
import com.blb.day20231107login.entity.Role;
import com.blb.day20231107login.entity.User;
import com.blb.day20231107login.service.IRoleService;
import com.blb.day20231107login.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
public class RoleController {

    @Autowired
    private IRoleService roleService;


    @GetMapping("/roles")
    public ResponseResult<List<Role>> findAll(){
        List<Role> roles = roleService.list();
        return ResponseResult.ok(roles);
    }



}
